<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>粘性定位</title>
		<style type="text/css">
			body{
				width: 100%;
				height: 1500px;
				margin: 0;
				padding: 0;
			}
			
			.div{
				margin-top: 600px;
				margin-bottom: 200px;
				position: sticky;
				top: 10px;
				/* bottom: 100px; */
				/* 定位原点：根据窗口定位 */
			}
		</style>
	</head>
	<body>
		<div class="div">
			<img src="../css动画/img/dog.jpg" >
		</div>
	</body>
</html>
